// 统一管理接口
import request from "@/request/request.js";

import qs from 'qs'

//请求精品推荐数据
export const JinPing = () => request.get("products/recommend");
// 请求热门兑换数据  
export const HotAPI = () => request.get("/products/hot");


// 发送短信验证码请求
export const SendSMSAPI = (params) =>
    request.post("/sendSMS", qs.stringify(params));

// 手机号验证
export const PhoneReginAPI = (params) =>
    request.post("/phoneRegin", qs.stringify(params));

// 微信登录请求
export const WeixinLoginAPI = (params) =>
    request.post("/wechatUsers/PCLogin", qs.stringify(params));

// 微信绑定手机号
export const BindingAPI = (params) =>
    request.post("/wechatUsers/binding", qs.stringify(params));


// 用户登录信息
export const UserProfilesAPI = () => request.get("/shop/userProfiles");


// 商品详情数据
export const GoodsDetailsAPI = (id) => request.get(`/products/${id}`);

// 加入购物车请求

export const addShopAPI = (params) =>
    request.post("/shop/carts/add", qs.stringify(params));
